gtk_tree_model_row_inserted (GTK_TREE_MODEL (filter), path, &iter);
+ if (level->parent_level && level->visible_nodes == 1)
+ {
+ /* We know that this is the first visible node in this level, so
+ * we need to emit row-has-child-toggled on the parent. This
+ * does not apply to the root level.
+ */
+
+ gtk_tree_path_up (path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (filter), &iter, path);
+
+ gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL (filter),
+ path,
+ &iter);
+ }
+
if (gtk_tree_model_iter_children (c_model, &children, c_iter))
gtk_tree_model_filter_update_children (filter, level, elt);
}
check_level_length (fixture->filter, "0:3", LEVEL_LENGTH);
check_level_length (fixture->filter, "0:4", 0);
- /* FIXME: We are missing a row-has-child-toggled signal for path "0:4" */
signal_monitor_append_signal (fixture->monitor, ROW_INSERTED, "0:4:0");
+ /* Once 0:4:0 got inserted, 0:4 became a parent */
+ signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0:4");
signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0:4:0");
signal_monitor_append_signal (fixture->monitor, ROW_INSERTED, "0:4:1");
signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0:4:1");
check_level_length (fixture->filter, "0:3", LEVEL_LENGTH);
check_level_length (fixture->filter, "0:4", 0);
- /* FIXME: We are missing a row-has-child-toggled signal for path "0:4" */
/* FIXME: Inconsistency! For the non-vroot case we also receive two
* row-has-child-toggled signals here.
*/
signal_monitor_append_signal (fixture->monitor, ROW_INSERTED, "0:4:0");
+ /* Once 0:4:0 got inserted, 0:4 became a parent */
+ signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0:4");
signal_monitor_append_signal (fixture->monitor, ROW_INSERTED, "0:4:1");
set_path_visibility (fixture, "2:0:4:2", TRUE);
set_path_visibility (fixture, "2:0:4:4", TRUE);
check_level_length (fixture->filter, "0", 0);
signal_monitor_append_signal (fixture->monitor, ROW_INSERTED, "0:0");
+ signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0");
signal_monitor_append_signal (fixture->monitor, ROW_HAS_CHILD_TOGGLED, "0:0");
set_path_visibility (fixture, "3:2", TRUE);
check_filter_model (fixture);